<?php
/*
+-----------------------------------------------------------------------------+
| $Id: *.php,v 1.* 2005/07/01 06:15:08 Bleakwind Exp $
| SnowStats
|         --- A Web Statistics Analysis for multiuser
| Copyright (c) 2003-2005 Weaverdream.com By Bleakwind
| http://www.weaverdream.com
+-----------------------------------------------------------------------------+
*/

include_once 'include/include.php';
include_once 'include/header.php';
?>

<table width="760" border="0" cellpadding="0" cellspacing="0" bgcolor="#5E94DD" align="center">
  <tr bgcolor="#5E94DD">
    <td width="200" align="center" valign="top" class="left_bg">
      <?include_once 'include/menu.php';?>
	</td>
	<td width="560" bgcolor="#FFFFFF" valign="top">

<?php
if( if_userlogin() != "y" && if_adminlogin() != "y" ){
    header("location:prompt.php?act=failed&url=login.php?act=login&ret=".htmlentities(urlencode($LANGUAGE['getcode_login']))."&mes=".htmlentities(urlencode($LANGUAGE['getcode_need_login'])));
    exit;
}
if( if_adminlogin() == "y" && if_selectuser() != "y" ){
    header("location:prompt.php?act=failed&url=login.php?act=select&ret=".htmlentities(urlencode($LANGUAGE['getcode_select']))."&mes=".htmlentities(urlencode($LANGUAGE['getcode_need_select'])));
    exit;
}

$user        = $_SESSION['sess_username'] ? $_SESSION['sess_username'] : $_SESSION['sess_select'];
$userdir     = $SETTING['dir_data'].$user;

$file_config = $userdir."/".$SETTING['file_config'];

include $file_config;

if($CONFIGUSER['mode'] == "js"){
    $quote_code = "<script src=\"".CONFIG_URL."stats.php?user=".$user."\"></script>";
}else{
    $quote_code = "<a href=\"".CONFIG_URL."login.php?user=".$user."\" target=\"_blank\"><img src=\"".CONFIG_URL."stats.php?user=".$user."\" border=\"0\"></a>";
}
?>

<table width="100%" border="0" cellspacing="0" cellpadding="3" align="center" bgcolor="#EBE9ED"><tr><td><img src="images/arrowright.gif" border=0 align="absmiddle"> <a href="index.php" target="_self"><font style="color:#000000;"><?php echo CONFIG_WEBSITE;?></font></a> &raquo; <?php echo $LANGUAGE['getcode_placedir'];?> &raquo; <?php echo $LANGUAGE['getcode_place'];?></td></tr></table>
<br>
<table width="95%" border="0" cellspacing="1" cellpadding="3" align="center" bgcolor="#FFFFFF">
<tr bgcolor="#5E94DD"><td align="center" class="right_title"><?php echo $LANGUAGE['getcode_explain'];?></td></tr>
<tr><td height="30" bgcolor="#EBE9ED" align="center">

<textarea rows=6 cols=60 name="code"><?php echo $quote_code;?></textarea>
<input type="button" value="<?php echo $LANGUAGE['getcode_copyto'];?>" onClick="CopyTo('code')" class="submit">

</td></tr></table>

<?php
echo "<br></td></tr></table>";
include_once 'include/footer.php';
?>